ifeq ($(PLATFORM),Linux)

compiler:=g++

subflag_specifier:=-c
ifeq ($($(TARGET)_TYPE),sharedlib)
subflag_more:=-fPIC
endif
subflag_out:=-o #
flag:=$(subflag_specifier) $(subflag_more) $(subflag_out)#

include_path_spec:=-I
macro_spec:=-D

else

compiler:=cl

subflag_specifier:=/c
subflag_out=/Fo:
flag:=/nologo /EHsc $(subflag_specifier) $(subflag_out)#

include_path_spec:=/I
macro_spec:=/D

endif



.PHONY:$(MAKECMDGOALS)
$(MAKECMDGOALS):$($(TARGET)_FLAKE$(MAKECMDGOALS))
$($(TARGET)_FLAKE$(MAKECMDGOALS)):$($(TARGET)_FLAKE$(MAKECMDGOALS)_source) $($(TARGET)_FLAKE$(MAKECMDGOALS)_header) $($(TARGET)_FLAKE$(MAKECMDGOALS)_inline)
ifeq ($(PLATFORM),Linux)
	@echo \-$(notdir $@)
else
	@echo -$(notdir $@)
endif
	@$(compiler) $($(TARGET)_FLAKE$(MAKECMDGOALS)_compile_flag_extra) $(flag)$($(TARGET)_FLAKE$(MAKECMDGOALS)) $(addprefix $(include_path_spec),$(PATH_INCLUDE)) $(addprefix $(macro_spec),$($(TARGET)_FLAKE$(MAKECMDGOALS)_D)) $(word 1,$^)
